// Styles for the search bar and results list.

.twitter-typeahead {
  display: block !important;
  position: relative;
}

.search-button {
  position: relative;
  top: 0;
  right: 0;
  margin-right: 0.5rem;
  float: right;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.search-button::before, .twitter-typeahead::before {
  content: '\f16c';
  display: block;
  position: absolute;
  top: 0.4rem;
  left: 0.9rem;
  z-index: 1;
  font-family: 'foundation-icons';
  font-size: 1.75rem;
  color: $dark-gray;
}
.search-button.search-open::before {
  content: '\f217';
  font-size: 1.5rem;
  padding-top: 5px;
  padding-right: 10px;
}



.docs-search:not(.tt-input),
.tt-input,
.tt-hint {
  right: 0;
  padding-left: 3rem;
  margin-bottom: 0rem;
  box-shadow: none;
//  box-shadow: 0px 1px 3px 0px rgba(0,0,0,0.15);
//  border-width: 1px 0;
  font-size: 1.3rem;
  height: 3.5rem;
  font-weight: 300;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-bottom: none;

  &:hover {
//    box-shadow: none;
  }

  &:focus {
//    border-width: 1px 0;
//    border: none;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-bottom: none;
    box-shadow: none;
  }

  @include breakpoint(small down) {
    border: 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;

    &:focus {
      border: 0;
      border-top: 1px solid #e0e0e0;
      border-bottom: 1px solid #e0e0e0;
    }
  }
}

.tt-menu {
  background: white;
  width: 100%;
  border: 1px solid #ccc;
}

.tt-suggestion {
  @include clearfix;
  padding: 0.5rem;

  &:hover,
  &.tt-cursor {
    background: $primary-color;
    color: #fff;
    cursor: pointer;

    .meta {
      color: #fff;
    }
  }

  .name {
    font-weight: bold;
  }

  .meta {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: $dark-gray;
    margin-left: 0.5rem;
  }

  .desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  @include breakpoint(medium) {
    padding: 1rem;

    .name {
      float: left;
      width: 40%;
    }

    .desc {
      float: left;
      width: 60%;
    }
  }
}

.tt-empty {
  padding: 1rem;

  &:before {
    content: ':(';
    font-weight: bold;
    font-size: 2rem;
    color: #999;
    margin-left: 1rem;
    margin-right: 2rem;
  }
}

.secondary-bar {
//  box-shadow: 0px 1px 5px 0px rgba(0,0,0,0.3);
  border-bottom: 1px solid #e0e0e0;
  position: relative;

}

.version-dropdown {

}

.version-menu-list {

}

.version-dropdown-label {
  color: $black;
  display: block;
  width: 100%;
  line-height: 1.25rem;
  padding-top: 0.42rem;
  padding-bottom: 0.43rem;
  padding-left: 1rem;
  margin-bottom: 0;
  background: none;
  text-align: left;
}

.changelog-link {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  text-align: right;
  margin-left: 0.25rem;
  color: $primary-color;
}

.version-dropdown-label:hover,
.version-dropdown-label:focus,{
  color: $black;
  background: none;
}

.dropdown.menu > li.is-dropdown-submenu-parent > a::after {
  border-color: $medium-gray transparent transparent;
}

.version-dropdown-menu {

}

.version-dropdown-menu-link {

  a {
    color: $black;
    font-size: 1rem;
  }
}

.github-button {
  font-size: 0; // trick to hide the space of the inline-block element
  @include vertical-center;
}

.social-container {
  padding-top: 0.9rem;
}

.social-list {
  list-style: none;
  margin-bottom: 0;

  position: absolute;
  right: 0;
  width: 102px;
  height: 100%;

  li {
    display: inline-block;
  }
}

.docs-search-wrapper {
  position: relative;
  padding-right: 139px !important;
}

.foundation-version-label {
  font-size: 0.85rem;
  color: #9f9f9f;
  display: block;
  font-family: sans-serif;
}


.foundation-version-number {
//  margin-left: 1rem;
  font-weight: 600;
  font-size: 1rem;
  font-family: sans-serif;
  color: #383838;
}

//.foundation-version-number::after {
//  display: inline-block;
//  margin-left: 0.5rem;
//  width: 0;
//  height: 0;
//  border: inset 5px;
//  content: '';
//  border-bottom-width: 1px;
//  border-top-style: solid;
//  border-color: #c3c3c3 transparent transparent;
//  right: 10px;
//}

.version-dropdown-menu {
  list-style: none;
  margin-bottom: 0;
  margin-left: 0;

  li {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e3e3e3;
  }

  li:last-child {
    border-bottom: none;
  }

  li:hover {
    background-color: #efefef;
  }

  a {
    color: #6d6d6d;
    padding-left: 2.1rem;
    padding-right: 2.1rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  a:hover {
    color: $black;
  }
}

.version-dropdown {
  width: 90px;
  padding: 0;
  box-shadow: 0px 3px 8px 0px rgba(0,0,0,0.2);
  left: 3rem;
}

.mobile-nav-button {
  margin: 0.6rem 0.3rem 0.5rem 0.5rem;
}

.inline-search {
  position: absolute;
  width: 100vw;
  left: 0;
  top: 0;
  display: none;
  &.expanded {
    display: block;
  }
}
